package cn.poem.controller;

import cn.poem.base.ResponseData;
import cn.poem.entity.PoetryComments;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.web.bind.annotation.*;

/**
 * @Description 诗词读后感
 * @Author sugar
 * @Date 2021/6/18 10:52 AM
 * @Version 1.0
 */
@RequestMapping("poem/poetry/comments/")
public interface PoetryCommentsController {

    /**
     * 发表读后感
     * @param poetryComments
     * @return
     */
    @PostMapping("save")
    ResponseData<Boolean> save(@RequestBody PoetryComments poetryComments);

    /**
     * 删除读后感
     * @param id
     * @return
     */
    @DeleteMapping("del/{id}")
    ResponseData<Boolean> del(@PathVariable("id") Long id);

    /**
     * 分页查询
     * @param page
     * @param size
     * @param poetryComments
     * @return
     */
    @GetMapping("page/{page}/{size}")
    ResponseData<IPage<PoetryComments>> page(@PathVariable("page") int page, @PathVariable("size") int size, PoetryComments poetryComments);

    @GetMapping("detail/{id}")
    ResponseData<PoetryComments> detail(@PathVariable("id") Long id);







}
